import java.util.Random;

/**
 * Created by BerkBozkurt on 10.5.2015.
 */
public class PowerUpFactory {

    private int POWERUP_SIZE = 7;

    public PowerUp createPowerUp(int x, int y){


        Random rand = new Random();
        int randomNum = rand.nextInt(POWERUP_SIZE) + 1;
        String powerUpType;

        switch(randomNum) {
            case 1:
                powerUpType = "Longer Paddle";
                break;
            case 2:
                powerUpType = "Shorter Paddle";
                break;
            case 3:
                powerUpType = "Faster Paddle";
                break;
            case 4:
                powerUpType = "Slower Paddle";
                break;
            case 5:
                powerUpType = "Faster Ball";
                break;
            case 6:
                powerUpType = "Slower Ball";
                break;
            case 7:
                powerUpType = "Triple Ball";
                break;
            default:
                powerUpType = "longerPaddle";
                break;
        }

        return new PowerUp(x, y, powerUpType);
    }

    public PowerUp createTripleBall(int x, int y) {
        PowerUp p = new PowerUp(x, y, "Triple Ball");
        return p;
    }

}
